import request from '@/utils/request'

// 查询商城父分类列表
export function fatherList(query) {
  return request({
    url: '/video/category/fatherList',
    method: 'get',
    params: query
  })
}

// 查询商城子分类列表
export function childrenList(query) {
  return request({
    url: '/video/category/childrenList',
    method: 'get',
    params: query
  })
}

// 查询商城分类详细
export function getCategory(id) {
  return request({
    url: '/video/category/' + id,
    method: 'get'
  })
}

// 新增商城分类
export function addCategory(data) {
  return request({
    url: '/video/category',
    method: 'post',
    data: data
  })
}

// 修改商城分类
export function updateCategory(data) {
  return request({
    url: '/video/category',
    method: 'put',
    data: data
  })
}

// 删除商城分类
export function delCategory(id) {
  return request({
    url: '/video/category/' + id,
    method: 'delete'
  })
}

// 批量修改语言包
export function batchUpdate(data) {
  return request({
    url: '/video/category/batchUpdate',
    method: 'post',
    data: data
  })
}
